
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>评论</title>
    <link rel="stylesheet" type="text/css" href="css/base.css" />
    <style>
        div.clearfix:hover{
            color: #c81623;
            background-color: lightgreen;
        }
        div.clearfix{border: 1px solid lightgrey; }
        body{text-align:center}
    </style>
</head>
<body>
<h1 align="center"> 评论板列表 </h1>

<p align="center">遍历List集合的全部元素：</p>
<br>
<div class="w">
    <div class="ar">
        <a href="${basePath}comment/add.jsp?mid=${param.mid}">添加</a>
    </div>

    <c:forEach items="${requestScope.commentList}" var="comment" varStatus="id">
        <div class="clearfix">
            <div class="pushTime fr">${comment.pushTime}</div>
        </div>
        <div class="clearfix">
            <div class="content al">${comment.content}</div>
        </div>
    </c:forEach>
</div>
</body>
</html>
